package com.qys.livesMall.financial.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 *
 * </p>
 *
 * @author
 * @since 2023-06-13
 */
@Getter
@Setter
@TableName("h2_financial_online_detail")
@Schema(name = "FinancialOnlineDetail", description = "")
public class FinancialOnlineDetail implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "用户认购记录id")
    @TableId(value = "id")
    private Long id;

    @Schema(description = "用户id")
    private Long userId;

    @Schema(description = "用户名")
    private String userName;

    @Schema(description = "理财产品id")
    private Long onlineFinancialId;

    @Schema(description = "购买金额")
    private BigDecimal amount;

    @Schema(description = "利率")
    private BigDecimal interestRate;

    @Schema(description = "到期结算数量")
    private BigDecimal incomeAmount;

    @Schema(description = "收益周期（天数）")
    private Integer period;

    @Schema(description = "状态： 1：未结算  2：已结算")
    private Byte status;

    @Schema(description = "购买时间")
    private LocalDateTime createTime;

    @Schema(description = "收益开始时间")
    private LocalDateTime startTime;

    @Schema(description = "收益结束时间")
    private LocalDateTime endTime;

    @Schema(description = "结算时间")
    private LocalDateTime settlementTime;

    @Schema(description = "合同")
    private String contract;

    @Schema(description = "返还本金时间")
    private LocalDateTime returnPrincipalTime;

    @Schema(description = "是否返还本金 1:已返回  2：未返回")
    private Byte returnPrincipalStatus;

    @Schema(description = "结算备注")
    private String settlementDesc;

    @Schema(description = "订单号")
    private String orderNo;
}
